package com.doumi.biz.qadev.api.methods;

import com.doumi.biz.qadev.api.bean.UserBaseInfoModel;
import com.doumi.biz.qadev.api.enums.FilterEnums;
import com.doumi.qadev.utils.ChineseName;
import com.doumi.qadev.utils.IOCSVUtils;
import com.doumi.qadev.utils.redis.RedisClusterUtils;
import org.testng.Reporter;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

/**
 * Created by YDZ on 2019/11/20.
 */
public class OperationRedis {
    private RedisClusterUtils redisUtils =RedisClusterUtils.getRedisUtil();
    private IOCSVUtils iocsvUtils = new IOCSVUtils();
    private ChineseName chineseName = new ChineseName();
    private Random rd =new Random();

    public  List<String> readCsvoperationRedis(String filename,String methods,Integer nums)  {
        List<String> user_id = new ArrayList<>();
        try {
            UserBaseInfoModel userBaseInfoModel = null;
            List<String[]> csvList = iocsvUtils.readForRowDataCSV(filename);
            if (csvList.size() == 0) {
                return user_id;
            }
            OperationRedis instance = this.getClass().newInstance();
            Method m = instance.getClass().getDeclaredMethod(methods, String[].class, Integer.class);
            List<String> listMobile = new ArrayList<>();
            for (int i = 0; i < csvList.size(); i++) {
                user_id.add(csvList.get(i)[0]);
                if (nums > 0 && i < nums) {
                    userBaseInfoModel = (UserBaseInfoModel) m.invoke(instance, csvList.get(i),i);
                    listMobile.add(userBaseInfoModel.getMobile());
                    operationRedis(userBaseInfoModel);
                } else {
                    Method Methods = instance.getClass().getDeclaredMethod("businessbehavior", String[].class, Integer.class);
                    userBaseInfoModel = (UserBaseInfoModel) Methods.invoke(instance, csvList.get(i),i);
                    //通话次数大于5次
                    if(methods.equals("mobile")&&i==6){operationRedisCallTimes(userBaseInfoModel);}
                    operationRedis(userBaseInfoModel);
                }
            }
            if(methods.equals("vacontMobile")){operationRedisSet("wt_vacant_mobile",listMobile.get(0),listMobile.get(1),listMobile.get(2),listMobile.get(3),listMobile.get(4));}

        } catch (Exception e) {
            e.printStackTrace();
        }
        return user_id;
    }
    //初始化数据
    public void operationRedis(UserBaseInfoModel userBaseInfoModel){
        redisUtils.set("wt_" + userBaseInfoModel.getUserId() + "_base", userBaseInfoModel.toJsonString());
        Reporter.log(redisUtils.getKey("wt_" + userBaseInfoModel.getUserId() + "_base"));
        System.out.println(redisUtils.getKey("wt_" + userBaseInfoModel.getUserId() + "_base"));

    }
    public void operationRedisCallTimes(UserBaseInfoModel userBaseInfoModel){
        redisUtils.set("o_phone_profile", String.valueOf(userBaseInfoModel.getUserId()));
        Reporter.log("插入redis中的数据为"+redisUtils.getKey("o_phone_profile"));
//        System.out.println(redisUtils.getKey("o_phone_profile"));
    }

    public void operationRedisSet(String key,String... value){
        redisUtils.setSetValue(key,value);
        Reporter.log("插入的key为："+key+"\n插入的value为:"+redisUtils.getSetKey(key).toString());
        System.out.println("插入的key为："+key+"\n插入的value为:"+redisUtils.getSetKey(key).toString());
    }
    public void clearRedisCallTimes(){
        System.out.println(redisUtils.getKey("o_phone_profile"));
        Reporter.log(redisUtils.getKey("o_phone_profile"));
        redisUtils.removeKey("o_phone_profile");
//        Reporter.log();

    }
    public void removeRedis(String key){
        redisUtils.removeKey(key);
    }
    //清空插入的数据
    public void removeRedis(List<String> key){
        for (int i = 0; i < key.size(); i++) {
//            System.out.println(redisUtils.getKey("wt_" +  key.get(i) + "_base"));
            redisUtils.removeKey("wt_" + key.get(i) + "_base");
        }
    }
//    @Test
//    public void getRedis(){
////        for (int i = 0; i < key.size(); i++) {
////            System.out.println(redisUtils.getKeys("wt_family_name"));
////        redisUtils.set("o_phone_profile","132456");
//            System.out.println(redisUtils.getKey("wt_family_name"));
//
////        }
//    }
    public String getValue(){
//        System.out.println();
        return redisUtils.getKey("o_phone_profile");
    }
    public String makemobile(){

        String mobile = "15914524";
        Integer nums =rd.nextInt(100);
        if (nums<10){
            mobile=mobile+"00"+nums;
        }else if (nums<100){
            mobile=mobile+"0"+nums;
        }else {
            mobile=mobile+nums;
        }
        return mobile;
    }
    /**
     *
     * @param list 数据库信息
     * @param frozenType 简历状态
     * @param business_behavior 商家行为 1有，0没有
     * @param communicationRecord 备注 “过期”，“不需要”，“不考虑”，“空号”
     * @param destroyed 销状态，0-未注销，5-已注销
     * @param black 黑产
     * @param white 白名单
     * @param source 简历来源
     * @param mobile 手机号
     * @return
     */
    public UserBaseInfoModel createInfo(String[] list, Integer frozenType, Integer destroyed, Integer business_behavior , String communicationRecord, Integer black, Integer white, String source, String mobile, Integer userstatus, String userName) {
        UserBaseInfoModel info =new UserBaseInfoModel();
        info.setUserId(Long.valueOf(list[0]));
        info.setAge(Integer.parseInt(list[1]));
        info.setIdentify(Integer.parseInt(list[2]));
        info.setGender(Integer.parseInt(list[3]));
        info.setDegree(Integer.parseInt(list[4]));
        info.setJobPrefer(rd.nextInt(2)==1?-99:99);
        info.setFrozenType(frozenType);
        info.setBusinessBehavior(business_behavior);
        info.setCommunicationRecord(communicationRecord);
        info.setIsDestroyed(destroyed);
        info.setIndustryId(rd.nextInt(3));
        info.setStatusBlack(black);
        info.setNickName(chineseName.getChineseName());
        info.setStatusWhite(white);
        info.setResumeDescription(chineseName.getChinese());
        info.setSource(source);
        info.setMobile(mobile);
        info.setUserStatus(userstatus);
        info.setUserName(userName);
        info.setJobDateType(1);
        return info;
    }

    public UserBaseInfoModel createInfo(String[] list, Integer frozenType, Integer destroyed, Integer business_behavior , String communicationRecord, Integer black, Integer white, String source, String mobile, Integer userstatus, String userName ,String resumeDescription) {
        UserBaseInfoModel info =new UserBaseInfoModel();
        info.setUserId(Long.valueOf(list[0]));
        info.setAge(Integer.parseInt(list[1]));
        info.setIdentify(Integer.parseInt(list[2]));
        info.setGender(Integer.parseInt(list[3]));
        info.setDegree(Integer.parseInt(list[4]));
        info.setJobPrefer(rd.nextInt(2)==1?-99:99);
        info.setFrozenType(frozenType);
        info.setBusinessBehavior(business_behavior);
        info.setCommunicationRecord(communicationRecord);
        info.setIsDestroyed(destroyed);
        info.setIndustryId(rd.nextInt(3));
        info.setStatusBlack(black);
        info.setNickName(chineseName.getChineseName());
        info.setStatusWhite(white);
        info.setResumeDescription(resumeDescription);
        info.setSource(source);
        info.setMobile(mobile);
        info.setUserStatus(userstatus);
        info.setUserName(userName);
        info.setJobDateType(1);
        return info;
    }
    public UserBaseInfoModel createInfo(String[] list, Integer frozenType, Integer destroyed, Integer business_behavior , String communicationRecord, Integer black, Integer white, String source, String mobile, Integer userstatus, String userName ,String resumeDescription,Integer jobDateType) {
        UserBaseInfoModel info =new UserBaseInfoModel();
        info.setUserId(Long.valueOf(list[0]));
        info.setAge(Integer.parseInt(list[1]));
        info.setIdentify(Integer.parseInt(list[2]));
        info.setGender(Integer.parseInt(list[3]));
        info.setDegree(Integer.parseInt(list[4]));
        info.setJobPrefer(rd.nextInt(2)==1?-99:99);
        info.setFrozenType(frozenType);
        info.setBusinessBehavior(business_behavior);
        info.setCommunicationRecord(communicationRecord);
        info.setIsDestroyed(destroyed);
        info.setIndustryId(rd.nextInt(3));
        info.setStatusBlack(black);
        info.setNickName(chineseName.getChineseName());
        info.setStatusWhite(white);
        info.setResumeDescription(resumeDescription);
        info.setSource(source);
        info.setMobile(mobile);
        info.setUserStatus(userstatus);
        info.setUserName(userName);
        info.setJobDateType(jobDateType);
        return info;
    }
    //正常用户信息  resumeDescription
    public UserBaseInfoModel businessbehavior(String[] lists,Integer i ){

        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }
    public UserBaseInfoModel resumeDescription(String[] lists,Integer integer ){

        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        String resumeDescription = FilterEnums.description.getKey().split(",")[integer] ;
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName,resumeDescription);
    }
    //冻结状态
    public UserBaseInfoModel frozenType(String[] lists,Integer i){
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[i]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile =makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }
    // 简历状态 不符合
    public UserBaseInfoModel destroyed(String[] lists,Integer i){
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[i]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }
    //商家行为
    public UserBaseInfoModel business_behavior(String[] lists,Integer i){
        Random rd =new Random();
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[0]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }
//备注信息
    public UserBaseInfoModel communicationRecord(String[] lists,Integer integer){
         // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
//        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }

    public UserBaseInfoModel black(String[] lists ,Integer i){
         // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[1]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }

    public UserBaseInfoModel white(String[] lists,Integer i ){
         // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[1]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }
    public UserBaseInfoModel source(String[] lists,Integer integer ){
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[integer] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }
    public UserBaseInfoModel username(String[] lists,Integer integer ){
        Random rd =new Random();
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = FilterEnums.user_name.getKey().split(",")[integer] ;
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);}

    public UserBaseInfoModel mobile(String[] lists,Integer integer ){
        Random rd =new Random();
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = FilterEnums.user_mobile.getKey().split(",")[integer] ;
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName() ;
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);}
    //正常用户信息  resumeDescription
    public UserBaseInfoModel userStatus(String[] lists,Integer i ){

        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[i]);
        String userName = chineseName.getChineseName();
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);
    }

    //正常用户信息  resumeDescription
    public UserBaseInfoModel jobDateType(String[] lists,Integer i ){

        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[0];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = makemobile();
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName();
        Integer jobDateType = 3;
        String resumeDescription = "测试人员";
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName,resumeDescription,jobDateType);
    }
    public UserBaseInfoModel vacontMobile(String[] lists,Integer integer ){
        Random rd =new Random();
        // 冻结状态
        Integer frozenType = Integer.valueOf(FilterEnums.frozen_type.getKey().split(",")[3]);
        // 简历状态
        Integer destroyed = Integer.valueOf(FilterEnums.is_destroyed.getKey().split(",")[0]);
        // 商家行为
        Integer business_behavior= Integer.valueOf(FilterEnums.business_behavior.getKey().split(",")[1]);
        // 备注
//        String communicationRecord = FilterEnums.communication_record.getKey().split(",")[integer];
        String communicationRecord="dasdas";
        // 黑名单
        Integer black = Integer.valueOf(FilterEnums.black_user.getKey().split(",")[0]);
        // 白名单
        Integer white =Integer.valueOf(FilterEnums.white_user.getKey().split(",")[0]);
        //简历来源
        String source = FilterEnums.source.getKey().split(",")[5] ;
        String mobile = FilterEnums.vacontMobile.getKey().split(",")[integer] ;
        // 用户状态
        Integer userstatus = Integer.valueOf(FilterEnums.user_status.getKey().split(",")[5]);
        String userName = chineseName.getChineseName() ;
        return createInfo(lists,frozenType,destroyed,business_behavior,communicationRecord,black,white,source,mobile,userstatus,userName);}
        public UserBaseInfoModel createInfo(String[] lists,Integer integer) {
        UserBaseInfoModel info =new UserBaseInfoModel();
        return info;
    }
}
